package com.zscat.mallplus.oms.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zscat.mallplus.utils.BaseEntity;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 订单中所包含的商品
 * </p>
 *
 * @author zscat
 * @since 2019-04-17
 */
@Data
@TableName("oms_order_item")
public class OmsOrderItem extends BaseEntity implements Serializable {

	private static final long serialVersionUID = 1L;

	@TableId(value = "id", type = IdType.AUTO)
	private Long id;

	/**
	 * 订单id
	 */
	@TableField("order_id")
	private Long orderId;

	/**
	 * 订单编号
	 */
	@TableField("order_sn")
	private String orderSn;

	@TableField("product_id")
	private Long productId;

	@TableField("product_pic")
	private String productPic;

	@TableField("product_name")
	private String productName;

	/**
	 * 副标题
	 */
	@TableField("product_sub_title")
	private String productSubTitle;

	@TableField("product_brand")
	private String productBrand;

	@TableField("product_sn")
	private String productSn;

	/**
	 * 销售价格
	 */
	@TableField("product_price")
	private BigDecimal productPrice;

	/**
	 * 购买数量
	 */
	@TableField("product_quantity")
	private Integer productQuantity;

	/**
	 * 商品sku编号
	 */
	@TableField("product_sku_id")
	private Long productSkuId;

	/**
	 * 商品sku条码
	 */
	@TableField("product_sku_code")
	private String productSkuCode;

	/**
	 * 商品分类id
	 */
	@TableField("product_category_id")
	private Long productCategoryId;

	/**
	 * 商品的销售属性
	 */
	private String sp1;

	private String sp2;

	private String sp3;

	private String sp4;

	private String sp5;

	private String sp6;

	/**
	 * 商品促销名称
	 */
	@TableField("promotion_name")
	private String promotionName;

	/**
	 * vip折扣金额
	 */
	@TableField("promotion_amount")
	private BigDecimal promotionAmount;

	/**
	 * 优惠券优惠分解金额
	 */
	@TableField("coupon_amount")
	private BigDecimal couponAmount;

	/**
	 * 积分优惠分解金额
	 */
	@TableField("integration_amount")
	private BigDecimal integrationAmount;

	/**
	 * 商品原价
	 */
	@TableField("real_amount")
	private BigDecimal realAmount;

	/**
	 * 秒杀活动id
	 */
	@TableField("gift_integration")
	private Integer giftIntegration;

	@TableField("gift_growth")
	private Integer giftGrowth;

	/**
	 * 商品销售属性:[{"key":"颜色","value":"颜色"},{"key":"容量","value":"4G"}]
	 */
	@TableField("product_attr")
	private String productAttr;

	/**
	 * 原订单状态：2->待发货；3->已发货；
	 */
	private Integer status;

	/**
	 * 1->普通商品；2->虚拟商品；
	 */
	private Integer type;
	@TableField("store_name")
	private String storeName;

	@TableField("is_fenxiao")
	private Integer isFenxiao;
	@TableField("invite_memberId")
	private Long inviteMemberId; // 分佣商品 链接带过来的会员编号

	/**
	 * 是否评价：0->未评价；1->已评价
	 */
	@TableField("is_comment")
	private Integer isComment;

	/**
	 * 评价时间
	 */
	@TableField("comment_time")
	private Date commentTime;

	@TableField("end_time")
	private Date endTime;

	/**
	 * 活动ID
	 */
	@TableField("act_id")
	private Long actId;

	/**
	 * 活动截止时间2
	 */
	@TableField("act_end_time")
	private Date actEndTime;

}
